/****************************************************************************
@FILENAME:	codec.h
@FUNCTION:	detect by decode define
@AUTHOR:	flege.zhang
@DATE:		2020.05.11
@COPYRIGHT(C) ZXW 2020
*****************************************************************************/

#ifndef _CODEC__H_
#define _CODEC__H_


#include "app_cfg.h"
#include "codec_v8t04a.h"
#include "codec_uart.h"
#include "codec_433.h"


#if(HW_DETECT_TYPE == DECODE_V8T04A_TYPE)
#define KEY_01									(0xA1)
#define KEY_02									(0xA2)
#define KEY_03									(0xA3)
#define KEY_04									(0xA4)
#define KEY_05									(0xA5)
#define KEY_06									(0xA6)
#define KEY_07									(0xA7)
#define KEY_08									(0xA8)
#elif(HW_DETECT_TYPE == DECODE_V8T04A_16_TYPE)
#define KEY_01									(0xA007)//0b1010 0000 0000 0111
#define KEY_02									(0xA00B)//0b1010 0000 0000 1011
#define KEY_03									(0xA013)//0b1010 0000 0001 0011
#define KEY_04									(0xA023)//0b1010 0000 0010 0011
#define KEY_05									(0xA043)//0b1010 0000 0100 0011
#define KEY_06									(0xA083)//0b1010 0000 1000 0011
#define KEY_07									(0xA103)//0b1010 0001 0000 0011
#define KEY_08									(0xA203)//0b1010 0010 0000 0011
#define KEY_09									(0xA403)//0b1010 0100 0000 0011
#define KEY_10									(0xA803)//0b1010 1000 0000 0011
#define KEY_COMB  								(0xAFFF)//0b1010 1111 1111 1111
#elif(HW_DETECT_TYPE == DECODE_UART_TYPE)
#define KEY_BINDING								(0x0F)
#define KEY_LAMP_ON_OFF							(0x10)
#define KEY_LAMP_AIDA_ON_OFF					(0x13)
#define KEY_LUM_CTRL							(0x20)
#define KEY_CTL_CTRL							(0x22)
#define KEY_NIGHT								(0x26)
#define KEY_RGB_AUTO							(0x30)
#define KEY_RGB_DIMMING							(0x32)
#define KEY_FAN_DIRECTION						(0x40)
#define KEY_FAN_MODE							(0x42)
#define KEY_VENTILATION							(0x50)
#define KEY_FAN_SPEED							(0x51)
#define KEY_SWING								(0x52)
#define KEY_DRY 								(0x53)
#define KEY_WARM								(0x55)
#define KEY_BATH 								(0x56)
#define KEY_TEMPERATURE							(0x5A)
#define KEY_TIMING_CLOSE 						(0x60)
#define KEY_GENERIC_ON_OFF 						(0x70)
#define KEY_ENTER_PAIR_STATUS					(0xFE)
#elif(HW_DETECT_TYPE == DECODE_433_TYPE)

#endif

#if((HW_DETECT_TYPE == DECODE_V8T04A_TYPE) || (HW_DETECT_TYPE == DECODE_V8T04A_16_TYPE))
#define WAKEUP_IO								(1<<7)		//GPIO07
#define UNUSED_IO								(~WAKEUP_IO)
#elif(HW_DETECT_TYPE == DECODE_UART_TYPE)
#define WAKEUP_IO								(1<<14)		//GPIO14
#define UNUSED_IO								(~WAKEUP_IO)
#elif(HW_DETECT_TYPE == DECODE_433_TYPE)
#define WAKEUP_IO								(1<<7)		//GPIO7
#define UNUSED_IO								(~WAKEUP_IO)
#endif


void 	detect_decode_init(void);

#endif

